package org.zjx.command.basic;

import org.zjx.command.Command;
import org.zjx.core.GameWindow;

/**
 * 点击指令 - 需要激活
 */
public class ClickCommand extends Command {
    private final int x, y;

    public ClickCommand(GameWindow window, int x, int y) {
        super(window, true, "Click[(" + x + "," + y + ")]");
        this.x = x;
        this.y = y;
    }

    @Override
    protected void doExecute() {
        System.out.println("[Command] Clicking on: " +
                (x >= 0 ? " at (" + x + "," + y + ")" : ""));
    }
}